CDO/WSL Windows 10

Setting up

Note: An X Server is only needed if you want a gui type interface. If you are happy running command lines just install the Ubuntu app from the Microsoft Store. 64 bit Windows 10 is required.

Follow the guide to setting up WSL (Windows Subsystem for Linux) from here.

CDO was installed from the command line in Ubuntu 18.04 by following these instructions.

Note: Installing CDO will take a very long time.

Test that CDO is working by opening a terminal window from Ubuntu and typing 'cdo. If it is working you will see some help information.

CDO

It is useful to be able to access files from the Windows 10 system, with Windows File Explorer. On the Ubuntu command line type:

explorer.exe .

To convert netcdf (.nc) files to grib it is helpful to make a shell script in the directory where you have your '.nc' files:

#!/bin/sh\\
#\\
# change name of uo variable\\
cdo chname,uo,var49 is.nc is1.nc\\
# change name of vo variable\\
cdo chname,vo,var50 is1.nc is2.nc\\
# convert the netCDF file to grib1\\
cdo -f grb copy is2.nc is.grb

Change the initial file name ('is.nc') to the name of your .nc file and run the script:

CDO

Open the grib file with OpenCPN in the normal way.